using Core.Domain.Entities;
using FluentNHibernate.Mapping;

namespace DataMain.Mappings
{
  public class CommunityMap : ClassMap<Community>
  {
    public CommunityMap()
    {
      Id(x => x.Id);
      Map(x => x.Name);
      HasMany(x => x.People).Inverse().Cascade.All();
      HasMany(x => x.Elections).Inverse().Cascade.All();
    }
  }
}